Here I'll be manipulating some of the school location data we have found.
In [2]:
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import seaborn
% matplotlib inline
seaborn.set()
In [3]:
school_data = pd.read_csv("../data/Directory-School-current.csv")
In [8]:
school_data.columns
Out[8]:
In [12]:
school_data.ix[:, ['Name', 'Longitude ', 'Latitude']].to_csv('../data/school_data.csv')
In [25]:
school_data.ix[:, ['Name', 'Longitude ', 'Latitude']]\
.apply(lambda x: ~np.any(x.isnull()), axis = 1)\
.pipe(lambda x: school_data.ix[x, ['Name', 'Longitude ', 'Latitude']])\
.to_csv('../data/school_data.csv', index = False)
In [18]:
school_data.apply?